package nku.csc364;

/* Raj Akula
 * AVLNode.java
 * 
 * Class for putting nodes into binary search trees
 * 
 */


public class AVLNode {
	
	private Comparable data;
	private AVLNode left;
	private AVLNode right;
	private AVLNode parent;
	
	//Constructor to create node... 
	public AVLNode(Comparable data, AVLNode newLNode, AVLNode newRNode, AVLNode parentNode) {
		this.data = data;
		this.left = newLNode;
		this.right = newRNode;
		this.parent = parentNode;
	}
	
	// Setters and getter methods for the instance fields
	public Comparable getData() {
		return data;
	}

	public AVLNode getLeft() {
		return left;
	}

	public AVLNode getRight() {
		return right;
	}
	
	public AVLNode getParent() {
		return parent;
	}

	public void setData(Comparable newData) {
		data = newData;
	}
	
	public void setLeft(AVLNode temp) {
		left = temp;
	}

	public void setRight(AVLNode temp) {
		right = temp;
	}
	
	public void setParent(AVLNode temp) {
		parent = temp;
	}
	
	
}
